<div ng-controller="ReturnformrCtrl" ng-init="addAction()" class="sui-form form-horizontal">
    <form name="returnForm" novalidate ng-submit="orderAdd()">
        <ul class="sui-breadcrumb">
            <li><a href="#/item/list">{{'returnform'| translate}}</a></li>
            <li class="active">{{returnform.return_form_id?'edit':'add_new' | translate}}</li>
        </ul>
        <div class="control-group">
            <label class="control-label v-top"><b style="color: #f00;">*</b>{{'orig_tid'| translate}}：</label>
            <div class="controls">
                <input ng-model="returnform.tid" name="tid" type="text" value="" class="input-xlarge" required readonly='true'>
                <orderlist  ng-show="!returnform.return_form_id" ng-model="isreturnform" set-order="setOrder(order)"></orderlist>
            </div>
        </div>
       
        <div class="control-group">
            <label class="control-label v-top"><b style="color: #f00;">*</b> {{'reason_id'| translate}}：</label>
            <div class="controls">
                  <input ng-model="returnform.reason_id" name="reason_id" type="text" value="" class="input-xlarge" required>
                <div ng-show="!returnForm.reason_id" class="sui-msg msg-error msg-clear help-block error">
                    <div class="msg-con">{{'required'| translate}}</div>
                    <s class="msg-icon"></s>
                </div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top"><b style="color: #f00;">*</b> {{'shipping_type'| translate}}：</label>
            <div class="controls">
                <input ng-model="returnform.shipping_type" name="shipping_type" type="text" value="" class="input-xlarge" required>
                <div ng-show="returnForm.shipping_type.$error.required" class="sui-msg msg-error msg-clear help-block error">
                    <div class="msg-con">{{'required'| translate}}</div>
                    <s class="msg-icon"></s>
                </div>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top"><b style="color: #f00;">*</b> {{'logistics_no'| translate}}：</label>
            <div class="controls">
                <input ng-model="returnform.logistics_no" name="logistics_no" type="text" value="" class="input-xlarge" required>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label v-top"><b style="color: #f00;">*</b> {{'buyer_account'| translate}}：</label>
            <div class="controls">
                <input ng-model="returnform.buyer_account" type="text" name="buyer_account" value="" class="input-xlarge" required>
                <div ng-show="returnForm.buyer_account.$error.required" class="sui-msg msg-error msg-clear help-block error">
                    <div class="msg-con">{{'required'| translate}}</div>
                    <s class="msg-icon"></s>
                </div>
            </div>
        </div>
        <div class="control-group" >
            <label class="control-label v-top"><b style="color: #f00;">*</b> {{'return_item_fee'| translate}}：</label>
            <div class="controls">
                <input ng-model="returnform.return_item_fee"  value="" name="return_item_fee" class="input-xlarge" required>
                <div ng-show="returnForm.return_item_fee.$error.required" class="sui-msg msg-error msg-clear help-block error ">
                    <div class="msg-con">{{'required'| translate}}</div>
                    <s class="msg-icon"></s>
                </div>
            </div>
        </div>
       
         <div class="control-group">
            <label class="control-label v-top"> {{'out_item_fee'| translate}}：</label>
            <div class="controls">
                <input ng-model="returnform.out_item_fee" value="" name="out_item_fee" class="input-xlarge" required>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label v-top"> {{'replenish_fee'| translate}}：</label>
            <div class="controls">
                <input ng-model="returnform.replenish_fee" value="" name="replenish_fee"  type="number" class="input-xlarge" required>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label v-top"> {{'refund_fee'| translate}}：</label>
            <div class="controls">
                <input ng-model="returnform.refund_fee" value=""   type="number" name="refund_fee" class="input-xlarge" required>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">  {{'other_fee'| translate}}：</label>
            <div class="controls">
               <input ng-model="returnform.other_fee" value=""  type="number" name="other_fee" class="input-xlarge" required>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">  {{'total_fee'| translate}}：</label>
            <div class="controls">
               <input ng-model="returnform.total_fee" value=""  type="number" name="total_fee" class="input-xlarge" required>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">  {{'return_point'| translate}}：</label>
            <div class="controls">
               <input ng-model="returnform.return_point" value=""  type="number" name="return_point" class="input-xlarge" required>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">  {{'buyer_nick'| translate}}：</label>
            <div class="controls">
               <input ng-model="returnform.buyer_nick" value=""  name="buyer_nick" class="input-xlarge" required>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top"> {{'receiver_name'| translate}}：</label>
            <div class="controls">
                 <input ng-model="returnform.receiver_name" type="text" value="" name="receiver_name" class="input-xlarge">
            </div>
        </div>
              
        <div class="control-group">
            <label class="control-label v-top">  {{'receiver_state'| translate}}：</label>
            <div class="controls">
               <input ng-model="returnform.receiver_state" value=""   name="receiver_state" class="input-xlarge" required>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">  {{'receiver_city'| translate}}：</label>
            <div class="controls">
               <input ng-model="returnform.receiver_city" value=""  name="receiver_city" class="input-xlarge" required>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">  {{'receiver_district'| translate}}：</label>
            <div class="controls">
               <input ng-model="returnform.receiver_district" value=""   name="receiver_district" class="input-xlarge" required>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top">  {{'receiver_address'| translate}}：</label>
            <div class="controls">
               <input ng-model="returnform.receiver_address" value="" name="receiver_address" class="input-xlarge" required>
            </div>
        </div>

        <div class="control-group">
            <label class="control-label v-top"><b style="color: #f00;">*</b> {{'in_items'| translate}}：</label>
            <div class="controls">
                <table class="sui-table table-bordered" ng-show="returnform.in_items"   style="margin-bottom: 5px;">
                    <thead>
                        <tr>
                            <th ng-show="returnform.return_form_id">{{'return_form_id'| translate}}</th>
                            <th>{{'itemid'| translate}}</th>
                            <th>{{'price'| translate}}</th>
                            <th>{{'sku_id'| translate}}</th>
                            <th>{{'num'| translate}}</th>
                            <th>{{'discount_fee'| translate}}</th>
                            <th>{{'payment'| translate}}</th>
                            <th>{{'remark'| translate}}</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr ng-repeat="sku in returnform.in_items">
                            <td ng-show="returnform.return_form_id">
                                {{sku.return_form_id}}
                            </td>
                            <td>
                                <input type="text" name="sku.item_id" ng-model="sku.item_id" style="width:50px" readonly='true'>
                            </td>
                            <td>
                                <input type="number" name="sku.price" ng-model="sku.price" style="width:50px" required>
                            </td>
                            <td>
                                <input type="number" name="sku.sku_id" ng-model="sku.sku_id" style="width:50px" readonly='true'>
                            </td>
                            <td>
                                <input type="number" name="sku.num" ng-model="sku.num" style="width:100px" required>
                            </td>
                            <td>
                                <input type="number" name="sku.discount_fee" ng-model="sku.discount_fee" style="width:100px">
                            </td>
                            <td>
                                <input type="number" name="sku.payment" ng-model="sku.payment" style="width:100px" required>
                            </td>
                            <td>
                                <input type="text" name="sku.remark" ng-model="sku.remark" style="width:100px">
                            </td>
                           
                        </tr>
                    </tbody>
                </table>
                </div>
        </div>
         <div class="control-group">
            <label class="control-label v-top"><b style="color: #f00;">*</b> {{'out_items'| translate}}：</label>
            <div class="controls">
                <table class="sui-table table-bordered" ng-show="returnform.out_items"   style="margin-bottom: 5px;">
                    <thead>
                        <tr>
                            <th ng-show="returnform.return_form_id">{{'return_form_id'| translate}}</th>
                            <th>{{'itemid'| translate}}</th>
                            <th>{{'price'| translate}}</th>
                            <th>{{'sku_id'| translate}}</th>
                            <th>{{'num'| translate}}</th>
                            <th>{{'discount_fee'| translate}}</th>
                            <th>{{'payment'| translate}}</th>
                            <th>{{'remark'| translate}}</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr ng-repeat="sku in returnform.out_items">
                            <td ng-show="returnform.return_form_id">
                                {{sku.return_form_id}}
                            </td>
                            <td>
                                <input type="text" name="sku.item_id" ng-model="sku.item_id" style="width:50px" readonly='true'>
                            </td>
                            <td>
                                <input type="number" name="sku.price" ng-model="sku.price" style="width:50px" required>
                            </td>
                            <td>
                                <input type="number" name="sku.sku_id" ng-model="sku.sku_id" style="width:50px" readonly='true'>
                            </td>
                            <td>
                                <input type="number" name="sku.num" ng-model="sku.num" style="width:100px" required>
                            </td>
                            <td>
                                <input type="number" name="sku.discount_fee" ng-model="sku.discount_fee" style="width:100px">
                            </td>
                            <td>
                                <input type="number" name="sku.payment" ng-model="sku.payment" style="width:100px" required>
                            </td>
                            <td>
                                <input type="text" name="sku.remark" ng-model="sku.remark" style="width:100px">
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="control-group zhide">
            <label class="control-label v-top"> {{'receiver_address'| translate}}：</label>
            <div class="controls">
                <input ng-model="returnform.receiver_address" type="text" value="" name="receiver_address" class="input-xlarge">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top"> {{'receiver_mobile'| translate}}：</label>
            <div class="controls">
                 <input ng-model="returnform.receiver_mobile" type="text" value="" name="receiver_mobile" class="input-xlarge">
            </div>
        </div>
        
     
        <div class="control-group">
            <label class="control-label v-top"> {{'receiver_zip'| translate}}：</label>
            <div class="controls">
                 <input ng-model="returnform.receiver_zip" type="text" value="" name="receiver_zip" class="input-xlarge">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label v-top"> {{'remark'| translate}}：</label>
            <div class="controls">
                 <input ng-model="returnform.reamrk" type="text" value="" name="reamrk" class="input-xlarge">
            </div>
        </div>

        <div class="control-group">
            <label class="control-label"></label>
            <div class="controls">
                <button type="submit" id="submit" class="sui-btn btn-primary" ng-disabled="!(returnForm.$valid)">
                    <span>{{'save' | translate}}</span>
                </button>
            </div>
        </div>
    </form>
</div>
